
var i = 0;
// confirm(1) 错误
// alert(1) 错误
// console.log(window, document) 错误
function a() {
	i = i + 1;
	console.log(i)
	postMessage(i); // 进程间通信
	setTimeout(a, 1000);
	onmessage = (e) => {
		console.log('主进程的参数：', e)
	}
}
a();